//
//  BSSBaseViewController.h
//  BrightSunnySky
//
//  Created by zhoujunchun on 2019/3/6.
//  Copyright © 2019 PURANG. All rights reserved.
//  主父类控制器

#import <UIKit/UIKit.h>

#import "Masonry.h"
#import "MBProgressHUD+WL.h"
#import "BSSRequest.h"
#import "BSSBaseNavigationController.h"
#import "BSSBaseNavigationBar.h"

NS_ASSUME_NONNULL_BEGIN

@interface BSSBaseViewController : UIViewController<MBProgressHUDDelegate, BSSBaseNavigationControllerDelegate, BSSBaseNavigationBarDelegate>
{
    BSSRequest    *_baseRequest;
}

@property (nonatomic, strong) NSDictionary          *data;
@property (nonatomic, strong) CAGradientLayer       *gradientLayer;


/**
 控制器是否允许右滑返回
 
 @return 默认yes
 */
- (BOOL)popGestureEnabled;


#pragma mark - 导航栏 NavigationBar

/**
 导航视图控件（状态栏+导航栏）
 */
@property (nonatomic, strong) BSSBaseNavigationBar  *navBar;

- (void)setNavBarType:(BSSNavBarType)type;

- (void)setNavBarTitle:(NSString *)title;

- (void)setNavBarTitleLabelType:(BSSNavBarTitleLabelType)titleLabelType;

- (void)setNavBarHidden:(BOOL)hidden;

// left
- (void)setNavBarLeftButtonType:(BSSNavBarLeftButtonType)leftButtonType;

- (void)setNavBarLeftButtonImage:(UIImage *)image;
///leftBtn点击事件 重写该函数应调用[super bss_navBarLeftButtonClicked:sender];
- (void)bss_navBarLeftButtonClicked:(UIButton *)sender;

// right
- (void)setNavBarRightButtonType:(BSSNavBarRightButtonType)rightButtonType;

- (void)setNavBarRightButtonTitle:(NSString *)title;

- (void)setNavBarRightButtonImage:(UIImage *)image;
///RightBtn点击事件 重写该函数应调用[super bss_navBarRightButtonClicked:sender];
- (void)bss_navBarRightButtonClicked:(UIButton *)sender;

//积分商城NavBar颜色
- (void)setNavBarColour;



#pragma mark - 登录相关操作

///**是否要求登录**/
//- (BOOL)isNeedLogin;
///**登录**/
//- (void)presentLoginVC;
///**要求登录并有回调 需要先判断是否登录 不可使用- (BOOL)isNeedLogin;**/
//- (void)isNeedLoginSuccess:(void (^)(void))success failure:(void (^)(void))failure;


///**是否要求认证**/
//- (BOOL)isNeedCompleteInfoVC;
///**认证**/
//- (void)presentCompleteInfoVC;
///**要求认证并有回调 需要先判断是否认证 不可使用- (BOOL)isNeedCompleteInfoVC;**/
//- (void)isNeedCompleteInfoVCSuccess:(void (^)(void))success failure:(void (^)(void))failure;


#pragma mark - 相册权限
/**获取是否打开相机权限**/
- (BOOL)jurisdictionoOFThePhoneCamera;
/**获取是否打开相册权限**/
- (BOOL)jurisdictionoOFThePhoneAlbum;



- (void)alertView:(NSString *)message;
- (void)alertViewTitle:(NSString *)title message:(NSString *)message actionTitle:(NSString *)actionTitle;


@end

NS_ASSUME_NONNULL_END

